/*
* Copyright 2024 NXP
* NXP Confidential and Proprietary. This software is owned or controlled by NXP and may only be used strictly in
* accordance with the applicable license terms. By expressly accepting such terms or by downloading, installing,
* activating and/or otherwise using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms.  If you do not agree to be bound by the applicable license
* terms, then you may not retain, install, activate or otherwise use the software.
*/

#include "events_init.h"
#include <stdio.h>
#include "lvgl.h"


static void AUDIO_PAGE_sound_event_handler (lv_obj_t *obj, lv_event_t event) 
{
	switch (event) {
	default:
		break;
	}
}
void events_init_AUDIO_PAGE(lv_ui *ui)
{
	lv_obj_set_event_cb(ui->AUDIO_PAGE_sound, AUDIO_PAGE_sound_event_handler);
}

static void IR_PAGE_event_handler (lv_obj_t *obj, lv_event_t event) 
{
	switch (event) {
	case LV_EVENT_PRESSED:
	{
		lv_obj_set_hidden(guider_ui.IR_PAGE_ICON_BACK, true);
		lv_obj_set_hidden(guider_ui.IR_PAGE_long_send, true);
		lv_obj_set_hidden(guider_ui.IR_PAGE_double_learn, true);
		lv_obj_set_hidden(guider_ui.IR_PAGE_ICON_REC, true);
		lv_obj_set_hidden(guider_ui.IR_PAGE_ICON_SEND, true);
		lv_obj_set_hidden(guider_ui.IR_PAGE_list_IR, true);
		lv_obj_set_hidden(guider_ui.IR_PAGE_label_1, true);
		lv_obj_set_hidden(guider_ui.IR_PAGE_cont_1, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_flag, true);
		lv_obj_set_hidden(guider_ui.IR_PAGE_waitflag, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_waitword, false);
		break;
	}
	case LV_EVENT_RELEASED:
	{
		lv_obj_set_hidden(guider_ui.IR_PAGE_label_1, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_ICON_BACK, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_long_send, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_double_learn, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_ICON_REC, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_ICON_SEND, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_list_IR, false);
		lv_obj_set_hidden(guider_ui.IR_PAGE_cont_1, true);
		break;
	}
	default:
		break;
	}
}
static void IR_PAGE_cont_1_event_handler (lv_obj_t *obj, lv_event_t event) 
{
	switch (event) {
	default:
		break;
	}
}
void events_init_IR_PAGE(lv_ui *ui)
{
	lv_obj_set_event_cb(ui->IR_PAGE, IR_PAGE_event_handler);
	lv_obj_set_event_cb(ui->IR_PAGE_cont_1, IR_PAGE_cont_1_event_handler);
}


void events_init(lv_ui *ui)
{

}
